{% load i18n %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>
    {% block title %}TITLE GOES HERE{% endblock %} - Teagarden
  </title>
  <link rel="icon" type="image/png" href="{{ STATIC_URL}}img/favicon.png" />
  <link rel="stylesheet" type="text/css" media="all" href="{{ STATIC_URL}}css/teagarden.css" />
  <script type="text/javascript"
          src="{% url django.views.i18n.javascript_catalog %}"></script>
  {% if is_dev %}
	  <script type="text/javascript" src="{{ STATIC_URL }}closure/goog/base.js"></script>
	  <script src="{{ STATIC_URL }}js/script.js?v=1"></script>
    <!-- Need this hack to use the debug toolbar -->
    <script type="text/javascript" src="/static/admin/js/jquery.min.js"></script>
  {% else %}
	  <script type="text/javascript" src="{{ STATIC_URL }}js/script.js.compiled?v=1"></script>
  {% endif %}
  
  <link rel="alternate" type="application/atom+xml" title="{% trans "Recent comments" %}" href="/rss/comments" />
</head>
<body>
<div id="help" style="display: none;">
  <p><div style="text-align: center;"><strong>{% trans "Keyboard Shortcuts" %}</strong></div></p>
  <table width="100%">
    <tr valign="top">
      <td>
        <table width="100%">
          <tr>
            <td></td><th>{% trans "File"%}</th>
          </tr>
      </table>
      </td>
      <td>
        <table width="100%">
          <tr>
            <td></td><th>{% trans "Table" %}</th>
            <tr>
              <td class="shortcut"><span class="letter">m</span> <b>:&nbsp;</b></td><td>{% trans "publish comments" %}</td>
            </tr>
          </tr>
      </table>
      </td>
    </tr>
  </table>
  </div>
<div class="page">
  <div class="head">
  <div class="logo">Teagarden</div>
    <div class="liner">
      {% if not user.id %}
        <a href="{% url django.contrib.auth.views.login %}">{% trans "Sign in" %}</a>
      {% endif %}
      {% if user.id %}
        <strong>{{ user.email }} ({{ user.username }})</strong>
        |
        <a href="">{% trans "Settings" %}</a>
        |
        <a href="{% url django.contrib.auth.views.logout %}">{% trans "Sign out" %}</a>
      {% endif %}
    </div>
    <form id="searchform" method="get" action="/search/">
      <input id="s" type="text" onblur="if ($('#s').val().trim()==''){$('#s').val('Search');}" onfocus="if ($('#s').val()=='Search'){$('#s').val('');}" value="Search" name="s"/>
    </form>

  <div class="navigation">
    <ul>
      {% if user.id %}
        <li class="first"><a href="{% url teagarden.views.dashboard %}">{% trans "Dashboard" %}</a></li>
        <li class="first"><a href="{% url teagarden.views.projects %}">{% trans "Projects" %}</a></li>
        {% if user.is_superuser %}
          <li class="first"><a href="/admin" target="_blank">{% trans "Administration" %}</a></li>
        {% endif %}
      {% else %}
        <li class="first"><a href="/">{% trans "Home" %}</a></li>
      {% endif %}
    </ul>
  </div>
  <div class="breadcrumb">
    {% block breadcrumbs %}{% endblock %}
  </div>
</div>

  <h1 style="padding: 5px;">
    {% block page-title %}{% endblock %}
  </h1>

<div class="body">
  <div class="main">
    <div class="main-inner">
      {% if messages %}
        <div class="message-box">
          <ul class="messages">
              {% for message in messages %}
                  <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
              {% endfor %}
          </ul>
        </div>
      {% endif %}
      {% block content %}{% endblock %}
    </div>
  </div>
</div>
<div class="foot">{% include "footer.html" %}</div>
</div>
<script>
var help_displayed = false;
teagarden.shortcuts.init_handler();
{% if table %}
  var publish_link = "{%url teagarden.views.publish table.id %}";
{% endif %}
</script>
</body>
</html>
